import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    addUpdateLxcgMaterial(type,data) {
        /**新增修改零星采购物料信息 insert-新增 update-修改*/
        return service({
            url: `/adscm/operation/lxcg/lxcgMaterial/${type}`,
            method: 'post',
            data
        })
    },

    lxMaterialList(data){
        /**零星采购物料信息列表*/
        return service({
            url: `/adscm/operation/lxcg/lxcgMaterial/select`,
            method: 'post',
            data
        })
    },
    lxMaterialSearch(data) {
        /**零星采购所有物料 -根据关键字搜索*/
        return service({
            url: `/adscm/operation/lxcg/lxcgMaterial/selectByKeyWords`,
            method: 'get',
            params: data
        })
    },

    lxSupplierList(data){
       /**零星采购供应商列表*/
       return service({
           url: `/adscm/operation/lxcg/lxcgSupplier/selectLxcgSupplier`,
           method: 'post',
           data
       })
    },
    addUpdatelxSupplier(type, data) {
        /**新增修改零星采购供应商基本信息 insert-新增 update-修改*/
        return service({
            url: `/adscm/operation/lxcg/lxcgSupplier/${type}`,
            method: 'post',
            data
        })
    },
    lxSupplierSearch(data) {
        /**零星采购采购供应商 -根据关键字搜索*/
        return service({
            url: `/adscm/operation/lxcg/lxcgSupplier/selectByKeyWords`,
            method: 'get',
            params: data
        })
    },
    addUpdateLxcgMaterialLinkSupplier(type,data){
         /**新增修改零星采购物料关联供应商 insert-新增 update-修改*/
         return service({
             url: `/adscm/operation/lxcg/lxcgBomSupplier/${type}`,
             method: 'post',
             data
         })
    },
    lxcgMaterialLinkSupplierList(bid) {
        /**物料关联供应商列表*/
        return service({
            url: `/adscm/operation/lxcg/lxcgBomSupplier/selectByBid/${bid}`,
            method: 'post',
        })
    },
    addUpdateLxcgTask(type,data){
        /**新增修改零星采购任务 insert-新增 update-修改*/
        return service({
            url: `/adscm/operation/lxcg/lxcgTask/${type}`,
            method: 'post',
            data
        })
    },
    lxcgTaskList(data) {
        /**零星采购任务列表*/
        return service({
            url: `/adscm/operation/lxcg/lxcgTask/select`,
            method: 'post',
            data
        })
    },
    lxcgTaskAddUpdataMaterial(type, data) {
        /** 零星采购任务添加采购物料*/
        return service({
            url: `/adscm/operation/lxcg/lxcgTaskDetail/${type}`,
            method: 'post',
            data
        })
    },
    lxcgTaskMaterialList(tid) {
        /** 零星采购任务添加采购物料*/
        return service({
            url: `/adscm/operation/lxcg/lxcgTaskDetail/selectByTid/${tid}`,
            method: 'post'
        })
    },
    lxcgMaterialBySid(sid) {
        /** 零星采购根据供应商Id查询采购物料*/
        return service({
            url: `/adscm/operation/lxcg/lxcgMaterial/selectBySid/${sid}`,
            method: 'post'
        })
    }
}
